package com.zero.enable.starter.configration;

import com.zero.enable.starter.service.CounterService;
import com.zero.enable.starter.service.LoggerService;
import com.zero.enable.starter.service.MonitorService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

public class MyEnableAutoConfig implements ImportSelector {
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        return new String[]{"com.zero.enable.starter.service.CounterService",
                "com.zero.enable.starter.service.LoggerService",
                "com.zero.enable.starter.service.MonitorService"};
    }

    @Bean
    public CounterService counterService() {
        return new CounterService();
    }

    @Bean
    public LoggerService loggerService() {
        return new LoggerService();
    }

    @Bean
    public MonitorService monitorService() {
        return new MonitorService();
    }

}
